//创建一个路由器，并暴露出来
import { createRouter,createWebHistory } from "vue-router";


const router = createRouter({
  history:createWebHistory(),
  routes:[
    {
    path: '/',
    component: () =>import('../views/Main.vue'),
    redirect:'/home',
    children:[
       {
        path:'/home',
        name:'home',
        component:() => import('../views/Home.vue')
       },
       {
        path: '/love',
        name: 'love',
         component:()=> import('../views/Love.vue')
       },
       {
        path:'/setting',
        name:'setting',
        component:()=> import('../views/Setting.vue')
       }
  ]}
]
})

export default router